<?php use_stylesheet('tickets.css') ?>

<?php include_partial('ticket/list', array( 'tickets' => $pager->getResults() )) ?>

<?php if ($pager->haveToPaginate()): ?>
<div class="pagination">
	<a href="<?php echo url_for('ticket/index') ?>?page=1">
		&lt;&lt;
	</a>

	<a href="<?php echo url_for('ticket/index') ?>?page=<?php echo $pager->getPreviousPage() ?>">
		&lt;
	</a>

	<?php foreach ($pager->getLinks() as $page): ?>
	<?php if ($page == $pager->getPage()): ?>
		<span><?php echo $page ?></span>
		<?php else: ?>
		<a href="<?php echo url_for('ticket/index') ?>?page=<?php echo $page ?>"><?php echo $page ?></a>
		<?php endif; ?>
	<?php endforeach; ?>

	<a href="<?php echo url_for('ticket/index') ?>?page=<?php echo $pager->getNextPage() ?>">
		&gt;
	</a>

	<a href="<?php echo url_for('ticket/index') ?>?page=<?php echo $pager->getLastPage() ?>">
		&gt;&gt;
	</a>
</div>
<?php endif; ?>

<div class="pagination_desc">
	<strong><?php echo $pager->getNbResults() ?></strong> Tickets

	<?php if ($pager->haveToPaginate()): ?>
	- Seite <strong><?php echo $pager->getPage() ?>/<?php echo $pager->getLastPage() ?></strong>
	<?php endif; ?>
</div>
